<?php
require("top.ajax.php");

$id = User::login($_POST['email'], md5($_POST['password']));
if($id) {
    $_SESSION['user'] = new User($id);
    $_SESSION['user']->load();
    $_SESSION['user']->getFriends();
    echo $_SESSION['user']['id'];
} else {
    echo "";
}

?>
